﻿@model FlashcardPdfCreator.ICardData[]
@{
    Layout = "~/Views/Shared/_mobile.cshtml";
}
<script type="text/javascript">
    jQuery(document).ready(function () { 

    var card = {};
    @if (Model != null)
    {
        foreach (var card in Model)
        { 
        <text>
        
		card["w"] = "@Html.Raw(card.Word)";
		card["p"] = "@Html.Raw(card.Pronunciation)";
		card["e"] = "@Html.Raw(card.Example)";
		card["m"] = "@Html.Raw(card.Meaning)";
		card["t"] = "@Html.Raw(card.ExampleTranslation)";

		if (!isCardAlreadyStored(card)) {
			var key = "fc_" + getTimeStamp();
			jQuery.jStorage.set(key, card);
			createListEntry(key);
		}
        </text>
        }
    }

    window.location.assign("/#listPanel");

    });
</script>
